from django.conf.urls import url
from django.conf.urls import include

from crm import views

urlpatterns = [
    url('^$', views.index, name='index'),
    # url('^sales/$', views.index, name='sales_index'),
    # url('^customers/$', views.customer_list, name='customer_list'),
    url('^customer/(?P<customer_id>\d+)/enrollment/$', views.enrollment, name='enrollment'),
    url('^contract_review/(?P<enrollment_id>\d+)/$', views.contract_review, name='contract_review'),    # 报名审核页面
    url('^customer/registriation/(?P<enrollment_id>\d+)/(?P<random_str>\w+)$', views.stu_registriation, name='registriation'),
    url('^id_photo/(?P<enrollment_id>\d+)/(?P<file_name>.*)',views.id_photo,name='id_photo'),    # 获取证件照
    url('^enrollment_objection/(?P<enrollment_id>\d+)/',views.enrollment_objection,name='enrollment_objection'),    # 驳回合同
    url('payment/(?P<enrollment_id>\d+)/$', views.payment, name='payment'),    # 添加缴费记录
    url('^file_list/(?P<enrollment_id>\d+)/$',views.file_list,name='file_list'),    # 获取已上传文件列表
    url('^file_delete/(?P<enrollment_id>\d+)/(?P<file_name>.*)',views.file_delete,name='file_delete'),    # 删除文件
    url('^class_list',views.class_list,name='crm_class'),
    url('^download_homework/(?P<class_id>\d+)/(?P<course_id>\d+)/(?P<studyrecord_id>\d+)/',views.download_homework,name='download_homework')
]
